<html>
<head>
<style type="text/css">

body, p {
  display: table;
  position: absolute;
}

</style>
</head>

<body>
<div>A B</div>
<p id="n">C D</p>
</body>

</html>
